﻿using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Resources;

using Game.Common;
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace Game.Terrain.Internal
{
    static class TerrianResourceFile
    {
        
        public static ImageSource Grass 
        {
            get { return GetImage("trr_grassland_1"); }
        }
        
        public static ImageSource Grass2
        {
            get { return GetImage("trr_grassland_2"); }
        }
        
        public static ImageSource Grass3 
        {
            get { return GetImage("trr_grassland_3"); }
        }
        
        public static ImageSource Grass4 
        {
            get { return GetImage("trr_grassland_4"); }
        }
        
        public static ImageSource Grass5 
        {
            get { return GetImage("trr_grassland_5"); }
        }
        
        public static ImageSource Grass6 
        {
            get { return GetImage("trr_grassland_6"); }
        }
        
        public static ImageSource Grass7 
        {
            get { return GetImage("trr_grassland_7"); }
        }
        
        public static ImageSource Grass8 
        {
            get { return GetImage("trr_grassland_8"); }
        }
        
        public static ImageSource Grass9 
        {
            get { return GetImage("trr_grassland_9"); }
        }
        
        public static ImageSource Grass10 
        {
            get { return GetImage("trr_grassland_10"); }
        }
        
        public static ImageSource Grass11 
        {
            get { return GetImage("trr_grassland_11"); }
        }
        
        public static ImageSource Grass12 
        {
            get { return GetImage("trr_grassland_12"); }
        }
        
        public static ImageSource Grass13 
        {
            get { return GetImage("trr_grassland_13"); }
        }
        
        public static ImageSource Grass14 
        {
            get { return GetImage("trr_grassland_14"); }
        }
        
        public static ImageSource Grass15 
        {
            get { return GetImage("trr_grassland_15"); }
        }
        
        public static ImageSource Grass16 
        {
            get { return GetImage("trr_grassland_16"); }
        }
        
        public static ImageSource Grass17 
        {
            get { return GetImage("trr_grassland_17"); }
        }
        
        public static ImageSource Grass18 
        {
            get { return GetImage("trr_grassland_29"); }
        }
        
        public static ImageSource Grass19 
        {
            get { return GetImage("trr_grassland_30"); }
        }
        
        public static ImageSource Grass20 
        {
            get { return GetImage("trr_grassland_31"); }
        }
        
        public static ImageSource FlatRock 
        {
            get { return GetImage("trr_rock_flat_1"); }
        }
        
        public static ImageSource FlatRock2
        {
            get { return GetImage("trr_rock_flat_2"); }
        }
        
        public static ImageSource FlatRock3 
        {
            get { return GetImage("trr_rock_flat_3"); }
        }
        
        public static ImageSource FlatRock4 
        {
            get { return GetImage("trr_rock_flat_4"); }
        }
        
        public static ImageSource FlatRock5 
        {
            get { return GetImage("trr_rock_flat_5"); }
        }
        
        public static ImageSource FlatRock6 
        {
            get { return GetImage("trr_rock_flat_6"); }
        }
        
        public static ImageSource FlatRock7 
        {
            get { return GetImage("trr_rock_flat_7"); }
        }
        
        public static ImageSource FlatRock8 
        {
            get { return GetImage("trr_rock_flat_8"); }
        }
        
        public static ImageSource FlatRock9 
        {
            get { return GetImage("trr_rock_flat_9"); }
        }
        
        public static ImageSource FlatRock10 
        {
            get { return GetImage("trr_rock_flat_10"); }
        }
        
        public static ImageSource FlatRock11 
        {
            get { return GetImage("trr_rock_flat_11"); }
        }
        
        public static ImageSource FlatRock12 
        {
            get { return GetImage("trr_rock_flat_12"); }
        }
        
        public static ImageSource FlatRock13 
        {
            get { return GetImage("trr_rock_flat_13"); }
        }
        
        public static ImageSource FlatRock14 
        {
            get { return GetImage("trr_rock_flat_14"); }
        }
        
        public static ImageSource FlatRock15 
        {
            get { return GetImage("trr_rock_flat_15"); }
        }
        
        public static ImageSource FlatRock16 
        {
            get { return GetImage("trr_rock_flat_16"); }
        }
        
        public static ImageSource FlatRock17 
        {
            get { return GetImage("trr_rock_flat_17"); }
        }
        
        public static ImageSource FlatRock18 
        {
            get { return GetImage("trr_rock_flat_18"); }
        }
        
        public static ImageSource FlatRock19 
        {
            get { return GetImage("trr_rock_flat_19"); }
        }
        
        public static ImageSource FlatRock20 
        {
            get { return GetImage("trr_rock_flat_20"); }
        }
        
        public static ImageSource WaterVeryShallow
        {
            get { return GetImage("trr_water_1_very_shallow"); }
        }
        
        public static ImageSource WaterShallow
        {
            get { return GetImage("trr_water_2_shallow"); }
        }
        
        public static ImageSource WaterMedium
        {
            get { return GetImage("trr_water_3_medium"); }
        }
        
        public static ImageSource WaterDeep
        {
            get { return GetImage("trr_water_4_deep"); }
        }
        
        public static ImageSource WaterOcean
        {
            get { return GetImage("trr_water_5_ocean"); }
        }
        
        public static ImageSource Concrete1 
        {
            get { return GetImage("trr_concrete_1"); }
        }
        
        public static ImageSource Mud1 
        {
            get { return GetImage("trr_mud_1"); }
        }
        
        public static ImageSource Sand1 
        {
            get { return GetImage("trr_sand_1"); }
        }
        
        public static ImageSource Sand2 
        {
            get { return GetImage("trr_sand_2"); }
        }
        
        public static ImageSource Sand3 
        {
            get { return GetImage("trr_sand_3"); }
        }
        
        public static ImageSource Sand4 
        {
            get { return GetImage("trr_sand_4"); }
        }
        
        public static ImageSource Sand5 
        {
            get { return GetImage("trr_sand_5"); }
        }
        
        public static ImageSource Sand6 
        {
            get { return GetImage("trr_sand_6"); }
        }
        
        public static ImageSource Sand7 
        {
            get { return GetImage("trr_sand_7"); }
        }
        
        public static ImageSource Sand8 
        {
            get { return GetImage("trr_sand_8"); }
        }
        
        public static ImageSource Sand9 
        {
            get { return GetImage("trr_sand_9"); }
        }
        
        public static ImageSource Sand10 
        {
            get { return GetImage("trr_sand_10"); }
        }
        
        public static ImageSource FewSnow1 
        {
            get { return GetImage("fewsnow1"); }
        }

        public static ImageSource GetImage(string name)
        {
            BitmapImage image = new BitmapImage();
            string uri = 
                @"Game.Terrain.Resources.Terrian."
                + name + ".png";
            Assembly a = Assembly.GetExecutingAssembly();
            Stream stream = a.GetManifestResourceStream(uri);
            image.BeginInit();
            image.StreamSource = stream;
            image.EndInit();
            
            return image;
        }
    }
}
